package cn.school.hotel.service.impl;

import cn.school.hotel.dao.TripAreaDicDao;
import cn.school.hotel.entity.TripAreaDic;
import cn.school.hotel.service.TripAreaDicService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("tripAreaDicService")
public class TripAreaDicServiceImpl extends ServiceImpl<TripAreaDicDao, TripAreaDic> implements TripAreaDicService {

    @Override
    public List<TripAreaDic> getArealist(String id) {
        LambdaQueryWrapper<TripAreaDic> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(TripAreaDic::getIsChina,1);
        wrapper.eq(TripAreaDic::getIsActivated,1);
        wrapper.eq(TripAreaDic::getParent,id);
        return list(wrapper);
    }
}
